package com.yxinsur.imc.business.mapper;

import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxinsur.imc.business.domain.ImcCommDetails;
import com.yxinsur.imc.business.form.CommDetailsForm;
import com.yxinsur.imc.business.vo.CommDetailsSearchVo;
import com.yxinsur.imc.business.vo.CommDetailsVo;
import org.apache.ibatis.annotations.Param;

/**
 * 佣金报主Mapper接口
 *
 * @author imc
 * @date 2021-05-25
 */
public interface ImcCommDetailsMapper extends BaseMapper<ImcCommDetails> {
    /**
     * 查询佣金报主
     *
     * @param id 佣金报主ID
     * @return 佣金报主
     */
    public ImcCommDetails selectImcCommDetailsById(Long id);

    /**
     * 查询佣金报主列表
     *
     * @param imcCommDetails 佣金报主
     * @return 佣金报主集合
     */
    public List<ImcCommDetails> selectImcCommDetailsList(ImcCommDetails imcCommDetails);

    /**
     * 新增佣金报主
     *
     * @param imcCommDetails 佣金报主
     * @return 结果
     */
    public int insertImcCommDetails(ImcCommDetails imcCommDetails);

    /**
     * 删除佣金报主
     *
     * @param id 佣金报主ID
     * @return 结果
     */
    public int deleteImcCommDetailsById(String id);

    /**
     * 修改佣金报主
     *
     * @param imcCommDetails 佣金报主
     * @return 结果
     */
    public int updateImcCommDetails(ImcCommDetails imcCommDetails);

    /**
     * 批量删除佣金报主
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteImcCommDetailsByIds(String[] ids);

    List<CommDetailsSearchVo> selectDetailsByBrokerInfo(CommDetailsForm commDetailsForm);

    ImcCommDetails selectCommDetailsByBrokerId(@Param("brokerId") Long brokerId, @Param("commId") Long commId);

    void deleteByCommId(@Param("commId") Long commId);

    int insertImcCommDetailsList(@Param("commDetails") ArrayList<ImcCommDetails> commDetails);
}
